﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Knife.Core.Util
{
    public class FileUtil
    {
        public static void SaveFile(string FileFullName, byte[] FileContent)
        {
            File.WriteAllBytes(FileFullName, FileContent);
        }

        public static void SaveStringToFile(string FileFullName, string Content)
        {
            using (System.IO.StreamWriter file = new System.IO.StreamWriter(FileFullName, false, Encoding.UTF8))
            {
                //开始写入
                file.WriteLine(Content);
            }
        }

        public static string ReadFileContent(string FileFullName)
        {
            return File.ReadAllText(FileFullName, Encoding.UTF8);
        }
    }
}
